package com.example.onlineeducation.data.model

import android.os.Parcelable
import androidx.recyclerview.widget.DiffUtil
import kotlinx.android.parcel.Parcelize

@Parcelize
data class RegisterSearchWorkTypeListDataModel(
    var workTypeId: String?,
    var workTypeName: String?
    ) : Parcelable {

    companion object {
        val diffCallback = object : DiffUtil.ItemCallback<RegisterSearchWorkTypeListDataModel>() {
            override fun areItemsTheSame(
                oldItem: RegisterSearchWorkTypeListDataModel,
                newItem: RegisterSearchWorkTypeListDataModel
            ): Boolean {
                return oldItem.workTypeId == newItem.workTypeId
            }

            override fun areContentsTheSame(
                oldItem: RegisterSearchWorkTypeListDataModel,
                newItem: RegisterSearchWorkTypeListDataModel
            ): Boolean {
                return oldItem.workTypeId == newItem.workTypeId
                        && oldItem.workTypeName == newItem.workTypeName

            }
        }
    }
}